<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="com.medicalsystem.wx.model.UserModel"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
String pid = (String)request.getParameter("id");
int id=Integer.valueOf(pid);  
 UserModel m=(UserModel)request.getSession().getAttribute("userModel");
			 int cursex=m.getSex();
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<title>既往史</title>
<meta name="viewport"
	content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="电子病历,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="<%=basePath%>css/weui.css" />
<link rel="stylesheet" href="<%=basePath%>css/example.css" />
<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>
<style type="text/css">
.weui_label {
	width: 8em
}
</style>
</head>
<script type="text/javascript">
var basePath="<%=basePath%>";
var id=<%=id%>
var cursex=<%=cursex%>;
	function localSel() {
		var localDiseaseSel = $("#localDiseaseSel").val();
		if(localDiseaseSel==1){
		$("#localDisease").show();
		}else{
			$("#localDisease").hide();
		}
	}
	function traumaSel(){
	var majorTraumaSel = $("#majorTraumaSel").val();
		if(majorTraumaSel==1){
		$("#majorTrauma").show();
		}else{
			$("#majorTrauma").hide();
		}
	}
	function operationOpt(){
		var operationSel = $("#operationSel").val();
		if(operationSel==1){
		$("#operation").show();
		}else{
			$("#operation").hide();
		}
	}
	function allergyOpt(){
	var allergySel = $("#allergySel").val();
		if(allergySel==1){
		$("#allergy").show();
		}else{
			$("#allergy").hide();
		}
	}
	//忽略
	function ignore(){
		$("input[type=reset]").trigger("click");//触发reset按钮
		tomenHis();
	}
	//曾患病
	function wasSickOpt(){
	var wasSickSel=$("#wasSickSel").val();
	if(wasSickSel==1){
		$("#wasSick").show();
	}else{
	$("#wasSick").hide();
	}
	}
</script>
<script type="text/javascript" src="js/caseHistoryEdit.js"></script>
<body ontouchstart>
	<div class="container js_container"></div>
	<form action="">
		<!-- 个人病史开始 -->
		<div class="page" id="personHistory">
			<div class="bd">
			
				<div class="weui_grids">
				<div id="historyName"  style="color:#3cc51f ;font-size: 20px;text-align: center;"></div>
				<h5 class="page_title" style="color:#225fba ;font-size: 18px;">既往病史</h5>
					<div class="weui_cells_title">
						
					</div>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 体健/体弱：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="bodyHealth"
								id="bodyHealth">
								<option value="1"
									<c:if test="${bean.bodyHealth==1 }">selected="selected"</c:if>>体健</option>
								<option value="0"
									<c:if test="${bean.bodyHealth==0 }">selected="selected"</c:if>>体弱</option>
							</select>
						</div>
					</div>
<!-- 					<div class="weui_cell weui_cell_select weui_select_after"> -->
<!-- 						<div class="weui_cell_hd"> -->
<!-- 							<span style="color: red;">*</span>体弱： -->
<!-- 						</div> -->
<!-- 						<div class="weui_cell_bd weui_cell_primary"> -->
<!-- 							<select class="weui_select" name="bodyWeak" -->
<!-- 								id="bodyWeak"> -->
<!-- 								<option value="0" -->
<!-- 									<c:if test="${bean.bodyWeak==0 }">selected="selected"</c:if>>否</option> -->
<!-- 								<option value="1" -->
<!-- 									<c:if test="${bean.bodyWeak==1 }">selected="selected"</c:if>>是</option> -->
<!-- 							</select> -->
<!-- 						</div> -->
<!-- 					</div> -->
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span>曾患病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="wasSickSel"
								id="wasSickSel" onchange="wasSickOpt();">
								<option value="0"
									<c:if test="${bean.wasSick==0 }">selected="selected"</c:if>>否</option>
								<option value="1"
									<c:if test="${bean.wasSick==1 }">selected="selected"</c:if>>是</option>
							</select>
						</div>
					</div>
						<textarea class="weui_textarea" placeholder="请输入曾患病" rows="3"
						id="wasSick" name="wasSick" style="display: none">${bean.wasSick }</textarea>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 重大外伤史：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="majorTraumaSel"
								id="majorTraumaSel" onchange="traumaSel();">
								<option value="0"<c:if test="${bean.majorTrauma==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.majorTrauma==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>

					</div>
					<textarea class="weui_textarea" placeholder="请输入重大外伤史" rows="3"
						id="majorTrauma" name="majorTrauma" >${bean.majorTrauma }</textarea>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 手术史：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="operationSel"
								id="operationSel" onchange="operationOpt();">
								<option value="0"<c:if test="${bean.operation==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.operation==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>

					</div>
					<textarea class="weui_textarea" placeholder="请输入手术史" rows="3"
						id="operation" name="operation" >${bean.operation }</textarea>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 过敏史：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="allergySel"
								id="allergySel" onchange="allergyOpt();">
								<option value="0"<c:if test="${bean.allergy==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.allergy==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>

					</div>
					<textarea class="weui_textarea" placeholder="请指出过敏源，如事物、药物等" rows="3"
						id="allergy" name="allergy" >${bean.allergy }</textarea>
					
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 是否按时预防接种：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="timelyVaccination"
								id="timelyVaccination" >
								<option value="0"<c:if test="${bean.timelyVaccination==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.timelyVaccination==1 }">selected="selected"</c:if>>有</option>
							<option value="2"<c:if test="${bean.timelyVaccination==2 }">selected="selected"</c:if>>不详</option>
							</select>
						</div>

					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 输血史：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="transfusion"
								id="transfusion" >
								<option value="0"<c:if test="${bean.transfusion==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.transfusion==1 }">selected="selected"</c:if>>有</option>
							<option value="2"<c:if test="${bean.transfusion==2 }">selected="selected"</c:if>>不详</option>
							</select>
						</div>

					</div>
				<h5 class="page_title" style="color:#225fba;font-size: 18px;">婚育病史</h5>
					<div class="weui_cells_title">
						
					</div>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 婚姻：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="marriage"
								id="marriage">

								<option value="0"
									<c:if test="${bean.marriage==0 }">selected="selected"</c:if>>未婚</option>
								<option value="1"
									<c:if test="${bean.marriage==1 }">selected="selected"</c:if>>已婚</option>
							</select>
						</div>
					</div>
				<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>月经初潮:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="number" name="menophania"
								id="menophania" placeholder="请输入月经初潮" value="${bean.menophania }" style="width: 80%">岁
						</div>
					</div>
					<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>持续时间:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="text" name="continueTime"
								id="continueTime" placeholder="请输入持续时间" value="${bean.continueTime }" >
						</div>
					</div>
					<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>间隔时间:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="text" name="intervalTime"
								id="intervalTime" placeholder="请输入间隔时间" value="${bean.intervalTime }" >
						</div>
					</div>

					<div class="weui_cell weui_cell_select weui_select_after femal">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 是否绝经：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="pausimenia"
								id="pausimenia">

								<option value="0"
									<c:if test="${bean.pausimenia==0 }">selected="selected"</c:if>>否</option>
								<option value="1"
									<c:if test="${bean.pausimenia==1 }">selected="selected"</c:if>>是</option>
							</select>
						</div>
					</div>
					<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>末次月经时间:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="text" name="endMeniaTime"
								id="endMeniaTime" placeholder="请输入末次月经时间" value="${bean.endMeniaTime }" >
						</div>
					</div>
					<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>妊娠次数:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="number" name="pregnancies"
								id="pregnancies" placeholder="请输入妊娠次数" value="${bean.pregnancies }" >
						</div>
					</div>
					<div class="weui_cell femal">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>生产次数:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="number" name="production"
								id="production" placeholder="请输入生产次数" value="${bean.production }" >
						</div>
					</div>
					<div class="weui_cell weui_cell_select weui_select_after femal">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 堕胎/死胎/难产：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="aborticide"
								id="aborticide">

								<option value="0"
									<c:if test="${bean.aborticide==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.aborticide==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
<h5 class="page_title" style="color:#225fba;font-size: 18px;">家族病史</h5>
					<div class="weui_cells_title">
						
					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 癌症：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="cancerSel"
								id="cancerSel" onchange="cancerOpt();">
							<option value="0"<c:if test="${bean.cancer==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.cancer==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<textarea class="weui_textarea" placeholder="请输入具体的癌症" rows="3"
						id="cancer" name="cancer" >${bean.cancer }</textarea>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 精神障碍性疾病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="psychogenySel"
								id="psychogenySel" onchange="psychogenyOpt();">
							<option value="0"<c:if test="${bean.psychogeny==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.psychogeny==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<textarea class="weui_textarea" placeholder="请输入精神障碍性疾病" rows="3"
						id="psychogeny" name="psychogeny" >${bean.psychogeny }</textarea>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span>高血压：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="highBloodPressure"
								id="highBloodPressure">
								<option value="0"
									<c:if test="${bean.highBloodPressure==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.highBloodPressure==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span>糖尿病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="diabetes"
								id="diabetes">
								<option value="0"
									<c:if test="${bean.diabetes==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.diabetes==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span>中风：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="stroke"
								id="stroke">
								<option value="0"
									<c:if test="${bean.stroke==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.stroke==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
				<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span>冠心病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="coronaryHeart"
								id="coronaryHeart">
								<option value="0"
									<c:if test="${bean.coronaryHeart==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.coronaryHeart==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 遗传病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="geneticDiseaseSel"
								id="geneticDiseaseSel" onchange="geneticDiseaseOpt();">
							<option value="0"<c:if test="${bean.geneticDisease==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.geneticDisease==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<textarea class="weui_textarea" placeholder="请输入遗传" rows="3"
						id="geneticDisease" name="geneticDisease" >${bean.geneticDisease }</textarea>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 重大致残/危机生命疾病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="disabilitySel"
								id="disabilitySel" onchange="disabilityOpt();">
							<option value="0"<c:if test="${bean.disability==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.disability==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
					<textarea class="weui_textarea" placeholder="请输入 重大致残/危机生命疾病" rows="3"
						id="disability" name="disability" >${bean.disability }</textarea>
<h5 class="page_title" style="color:#225fba;font-size: 18px;">个人病史</h5>
					<div class="weui_cells_title">
						
					</div>
					<div class="weui_cell">
						<div class="weui_cell_hd">
							<label for="birthPlace" class="weui_label"><span
								style="color: red;">*</span>出生地:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="text" name="birthPlace"
								id="birthPlace" placeholder="请输入出生地" value="${bean.birthPlace }">
						</div>
					</div>

					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 教育程度：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="educationDegree"
								id="educationDegree">

								<option value="0"
									<c:if test="${bean.educationDegree==0 }">selected="selected"</c:if>>高中以下</option>
								<option value="1"
									<c:if test="${bean.educationDegree==1 }">selected="selected"</c:if>>高中</option>
								<option value="2"
									<c:if test="${bean.educationDegree==2 }">selected="selected"</c:if>>中专</option>
								<option value="3"
									<c:if test="${bean.educationDegree==3 }">selected="selected"</c:if>>大专</option>
								<option value="4"
									<c:if test="${bean.educationDegree==4 }">selected="selected"</c:if>>本科</option>
								<option value="5"
									<c:if test="${bean.educationDegree==5 }">selected="selected"</c:if>>硕士</option>
								<option value="6"
									<c:if test="${bean.educationDegree==6 }">selected="selected"</c:if>>博士</option>
								<option value="7"
									<c:if test="${bean.educationDegree==7 }">selected="selected"</c:if>>教授</option>
							</select>
						</div>
					</div>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 地方病/流行病：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="localDiseaseSel"
								id="localDiseaseSel" onchange="localSel();">
								
								<option value="0"<c:if test="${bean.localDisease==0 }">selected="selected"</c:if>>无</option>
							<option value="1"<c:if test="${bean.educationDegree==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>

					</div>
					<textarea class="weui_textarea" placeholder="请输入地方病/流行病" rows="3"
						id="localDisease" name="localDisease">${bean.localDisease }</textarea>
					<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 经济状况：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="economics"
								id="economics">
								<option value="0"
									<c:if test="${bean.economics==0 }">selected="selected"</c:if>>差</option>
								<option value="1"
									<c:if test="${bean.economics==1 }">selected="selected"</c:if>>一般</option>
								<option value="2"
									<c:if test="${bean.economics==2 }">selected="selected"</c:if>>好</option>
							</select>
						</div>
					</div>
				<div class="weui_cell">
						<div class="weui_cell_hd">
							<label for="profession" class="weui_label"><span
								style="color: red;">*</span>职业:</label>
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<input class="weui_input" type="text" name="profession"
								id="profession" placeholder="请输入职业" value="${bean.profession }">
						</div>
					</div>
				<div class="weui_cell weui_cell_select weui_select_after">
						<div class="weui_cell_hd">
							<span style="color: red;">*</span> 不洁性生活史：
						</div>
						<div class="weui_cell_bd weui_cell_primary">
							<select class="weui_select" name="sexualBehavior"
								id="sexualBehavior">
								<option value="0"
									<c:if test="${bean.sexualBehavior==0 }">selected="selected"</c:if>>无</option>
								<option value="1"
									<c:if test="${bean.sexualBehavior==1 }">selected="selected"</c:if>>有</option>
							</select>
						</div>
					</div>
				<div class="weui_cells_title">现病史</div>
				<div class="weui_cells weui_cells_form">
            <div class="weui_cell">
                <div class="weui_cell_bd weui_cell_primary">
                    <textarea class="weui_textarea" placeholder="请输入现病史" rows="6" id="presentIness" name="presentIness"></textarea>
                </div>
            </div>
        </div>
				
				
<input type="hidden" id="id" name="id"/>
<a href="javascript:;" class="weui_btn weui_btn_primary" onclick="toSave();">保存</a>
				</div>
			</div>
			
			
		</div>
		<!-- 个人病史结束 -->


	</form>
	
	
	<!--     toast开始 -->
						<div id="loadingToast" class="weui_loading_toast"
							style="display: none;">
							<div class="weui_mask_transparent"></div>
							<div class="weui_toast">
								<div class="weui_loading">
									<div class="weui_loading_leaf weui_loading_leaf_0"></div>
									<div class="weui_loading_leaf weui_loading_leaf_1"></div>
									<div class="weui_loading_leaf weui_loading_leaf_2"></div>
									<div class="weui_loading_leaf weui_loading_leaf_3"></div>
									<div class="weui_loading_leaf weui_loading_leaf_4"></div>
									<div class="weui_loading_leaf weui_loading_leaf_5"></div>
									<div class="weui_loading_leaf weui_loading_leaf_6"></div>
									<div class="weui_loading_leaf weui_loading_leaf_7"></div>
									<div class="weui_loading_leaf weui_loading_leaf_8"></div>
									<div class="weui_loading_leaf weui_loading_leaf_9"></div>
									<div class="weui_loading_leaf weui_loading_leaf_10"></div>
									<div class="weui_loading_leaf weui_loading_leaf_11"></div>
								</div>
								<p class="weui_toast_content">保存中...</p>
							</div>
						</div>

						<div id="toast" style="display: none;">
							<div class="weui_mask_transparent"></div>
							<div class="weui_toast">
								<i class="weui_icon_toast"></i>
								<p class="weui_toast_content" id="info">保存成功</p>
							</div>
						</div>
						<!--     toast结束 -->
</body>
</html>
